package com.tte.common.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

/**
 * @PackageName: com.tte.common.config
 * @ClaseName: TaskSchedulerConfig
 * @Description: 定时任务线程池
 * @Author: DongWH
 * @Date: 2023/12/15 10:32
 * @params *@params $
 */
@Configuration
public class TaskSchedulerConfig {

    @Bean
    public TaskScheduler taskScheduler() {
        ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
        taskScheduler.setPoolSize(36);
        return taskScheduler;
    }

}
